<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>全局组件定义</title>
	</head>
	<body>
		<div id="app">
			
			<router-link to="/home"></router-link>
			<router-view></router-view>
		</div>
		<template id="homeTem">
			<div>
				<h1>这里是系统首页</h1>
			</div>
		</template>
		<script src="../js/vue.js"></script>
		<script src="../js/vue-router.js"></script>
		<script>
		let HomeCom={
			template:"#homeTem"
		}
		let router=new VueRouter({
			routes:[
				{path:"/home",component:HomeCom,
				children:[
					{path:"/lionOne",component:OneCom}
				]}
			]
		})
		const app=new Vue({
			el:"#app",
			router
		})
		</script>
	</body>
</html>
